package com.sun.showcase.biz.mall.service;

import com.sun.showcase.client.domain.mall.ShoppingCart;
import com.sun.showcase.client.query.mall.ShoppingCartQuery;
import com.sun.showcase.pojo.DataGrid;
import com.sun.showcase.utils.ExecuteResult;

import java.util.List;

public interface ShoppingCartService{

	/**
	 * 获得数据表格
	 * 
	 * @param
	 * @return
	 */
	public DataGrid datagrid(ShoppingCartQuery shoppingCartQuery);

	/**
	 * 添加
	 * 
	 * @param shoppingCartQuery
	 */
	public ShoppingCart add(ShoppingCartQuery shoppingCartQuery);

	/**
	 * 修改
	 * 
	 * @param shoppingCartQuery
	 */
	public void update(ShoppingCartQuery shoppingCartQuery) ;
	
	/**
	 *  根据条件更新部分字段
	 * 
	 * @param shoppingCartQuery
	 */
	public void updatePart(ShoppingCartQuery shoppingCartQuery) ;

	/**
	 * 物理删除
	 * 
	 * @param ids
	 */
	public void delete(String[] ids);

	/**
	 * 逻辑删除 更新状态位
	 *
	 * @param ids
	 */
	public void deletePt(String[] ids);

	/**
	 * 获得
	 *
	 * @param ShoppingCart
	 * @return
	 */
	public ShoppingCart get(ShoppingCartQuery shoppingCartQuery);


	/**
	 * 获得
	 *
	 * @param
	 * @return
	 */
	public ShoppingCart get(String id);

	/**
	 * 获取所有数据
	 */
	public List<ShoppingCartQuery> listAll(ShoppingCartQuery shoppingCartQuery);


	public ExecuteResult<String> save(ShoppingCartQuery shoppingCartQuery);

	public ExecuteResult<String> updateBuyNum(ShoppingCartQuery shoppingCartQuery);

	public void deleteByUserId(String userId);

	public void deleteById(String id);

	public void updateBySkuId(ShoppingCartQuery shoppingCartQuery);

	public void deleteBySkuId(String skuId);

	public void deleteByGoodsId(String goodsId);

	public void updateFreightByGoodsId(String goodsId, String freightId);
}
